package org.jeecg.modules.app.v1.util;

import io.swagger.models.auth.In;

/**
 * 这里是一个注释
 *
 * @author scw
 * @version v1.0
 * @date
 */
public class Const {

    /**头像地址
     *
     */
    public static final String AVATARURL="/sys/common/static/";

    public final static String transfer_number_RK = "RK"; //新增设备入库
    public final static String transfer_number_TK = "TK"; // bd退库
    public final static String transfer_number_ZY = "ZY"; // 资产转移
    public final static String transfer_number_BD= "BD"; // 绑定门店
    public final static String transfer_number_JB = "JB"; //从门店解绑
    public final static String transfer_number_BX = "BX"; //故障报修
    public final static String transfer_number_BS = "BS"; //报失
    public final static String transfer_number_LY = "LY"; //
    public final static String transfer_number_DB = "DB"; // 后台管理员调拨


    /**
     * 用于设备记录表（yl_device_records） 的 transfer_type
     */
    /**BD领用出库*/
    public final static String transferType_1 = "1";
    /**BD退回入库*/
    public final static String transferType_2 = "2";
    /**资产入库*/
    public final static String transferType_3 = "3";
    /**绑定门店*/
    public final static String transferType_4 = "4";
    /**解绑门店*/
    public final static String transferType_5 = "5";
    /**BD间资产转移*/
    public final static String transferType_6 = "6";
    /**仓库调拨*/
    public final static String transferType_7 = "7";
    /**故障保修退库*/
    public final static String transferType_8 = "8";
    /**设备报失*/
    public final static String transferType_9 = "9";


    /**
     * 设备来源：1仓库  2BD  3门店，
     * 字典：source_type
     * 说明：（与设备表的device_status保持一致，目前保修退库涉及从门店退库还是从BD退库，用于资产一览统计）
     * 表：用于设备记录表（yl_device_records） 的 source_type
     */
    public final static Integer sourceType_1 = 1;
    public final static Integer sourceType_2 = 2;
    public final static Integer sourceType_3 = 3;

    /**
     * 设备状态1仓库2BD3门店
     * 4初次添加后绑定设备SN  9初次添加未绑定SN(可删除状态)
     * 用于设备表（yl_device）的 device_status
     */
    public final static Integer deviceStatus_1 = 1;
    public final static Integer deviceStatus_2 = 2;
    public final static Integer deviceStatus_3 = 3;
    public final static Integer deviceStatus_4 = 4;
    public final static Integer deviceStatus_9 = 9;

    /**
     * 设备故障状态有无故障1正常2故障
     * 用于设备表（yl_device）的 is_fault
     */
    public final static Integer isFault_1 = 1;
    public final static Integer isFault_2 = 2;

    /**
     * 当前申请是否需要审核（是否开启自动审核）
     * 用于设备记录表（yl_device_records）的 is_check
     */
    public final static Integer isCheck_1 = 1;
    public final static Integer isCheck_2 = 2;

    /**
     * 设备审核状态1待审核2通过3驳回9其他
     * 用于设备记录表(yl_device_records)的 transfer_status
     */
    public final static Integer transferStatus_1 = 1;
    public final static Integer transferStatus_2 = 2;
    public final static Integer transferStatus_3 = 3;
    public final static Integer transferStatus_4 = 4;


    /**
     * 是否组长1是2否
     */
    public final static String leader_1 = "1";
    public final static String leader_2 = "2";

    /**
     * 是否1是2否
     */
    public final static Integer YES_1 = 1;
    public final static Integer NO_2 = 2;

    public final static String TIME_000000 = "00:00:00";
    public final static String TIME_235959 = "23:59:59";

    /**
     * 用于设备入库表（yl_warehouse_records）的备注信息 remark
     * 设备记录表（yl_device_records）的transfer_id、transfer_name、transfer_remark
     */
    public final static String RK = "设备入库";
    public final static String RK_ID = "RK123456";
    public final static String CK = "设备出库";
    public final static String CK_ID = "CK123456";
    public final static String DBO = "后台调拨";
    public final static String DBO_ID = "DBO123456";

    /**
     * 门店表（yl_shop）状态（shop_status）1待审核2营业中3审核未通过4公海
     */
    public final static Integer shop_status_1 = 1;
    public final static Integer shop_status_2 = 2;
    public final static Integer shop_status_3 = 3;
    public final static Integer shop_status_4 = 4;

    /**
     * 设备表（yl_device）业务ID(business_id）前缀，代表业务不通
     * A设备绑定门店等待审核  business_id = A_yl_shop_ID 代表yl_shop表的ID，以下同。
     * B设备退库等待审核 （包含正常退库 、故障保修退库 ） business_id = B_yl_device_records_ID
     * C设备资产转移待审核  business_id = C_yl_device_records_ID
     * D 设备解绑  business_id = C_yl_device_records_ID
     *
     * ***********************注：针对加锁的业务，审核过后一定要解锁操作。********************************
     *
     */
    public final static String device_business_id_A = "A_%s";
    public final static String device_business_id_B = "B_%s";
    public final static String device_business_id_C = "C_%s";
    public final static String device_business_id_D = "D_%s";
    /**
     * 设备表（yl_device）业务ID(device_lock）
     * 正常状态1
     * 非正常状态    device_business_id_A、device_business_id_B、device_business_id_C
     */
    public final static String deviceLock_1 = "1";


    public final static String empty_shop_key = "bank:empty:shopId";


    /**
     * 无设备门店任务key
     * 用于记录7天无设备门店到时自动进入公海任务
     * @param shopId
     * @return
     */
    public static String getEmptyShopKey(String shopId){
        return empty_shop_key.replace("shopId",shopId);
    }


}
